********************************************
* Authoritarian nostalgia and support for  *
* (populist radical) right parties         *
*                                          *
* Luca Manucci                             *
* Steven M. Van Hauwaert                   *
********************************************

// Recoding

* Party support

gen Q40b = Q40
recode Q40b (66=.) (77=9) (88=.) (99=.)
label define Q40b 1 "BE" 2 "Chega" 3 "IL" 4 "Livre" 5 "PAN" 6 "PCP-PEV" 7 "PPD/PSD" 8 "PS" 9 "Other"
label values Q40b Q40b

gen prr_support = 0
replace prr_support = 1 if Q40b == 2
replace prr_support = . if Q40 == 99
label def prr_support 0 "Not a Chega supporter" 1 "Chega supporter"
label values prr_support prr_support


* General nostalgia items

gen Q36_Q38_2_reverse = 6 - Q36_Q38_2
label def Q36_Q38_2_reverse 1 "strongly agree" 2 "rather agree" 3 "neither agree nor disagree" 4 "rather disagree" 5 "strongly disagree"
label values Q36_Q38_2_reverse Q36_Q38_2_reverse

* Authoriatian nostalgia items

gen Q70_reverse = 4 - Q70
label def Q70_reverse 1 "As a period that had more negative than positive aspects" 2 "As a period that had as many positive aspects as negative ones" 3 "As a period that had more positive than negative aspects"
label values Q70_reverse Q70_reverse


* Making authoritarian nostalgia index

alpha Q72_76_1 Q72_76_2 Q72_76_5 Q68_69_1

polychoric Q72_76_1 Q72_76_2 Q72_76_5 Q68_69_1
display r(sum_w)
global N = r(sum_w)
matrix r = r(R)
factormat r, n($N)
predict auth_nostalgia_cfa3
label variable auth_nostalgia_cfa3 "Authoritarian nostalgia index3 (CFA)"

irt grm Q72_76_1 Q72_76_2 Q72_76_5 Q68_69_1
predict auth_nostalgia_irt3
label variable auth_nostalgia_irt3 "Authoritarian nostalgia index3 (IRT)"

* Questions about regime transition

gen Q68_69_2_reverse = 6 - Q68_69_2
label def Q68_69_2_reverse 1 "strongly agree" 2 "rather agree" 3 "neither agree nor disagree" 4 "rather disagree" 5 "strongly disagree"
label values Q68_69_2_reverse Q68_69_2_reverse

* Authoritarian attitudes

gen Q41_3_reverse = 6 - Q41_3
gen Q42_45_1_reverse = 6 - Q42_45_1
gen Q42_45_3_reverse = 6 - Q42_45_3


factor Q41_1 Q41_2 Q41_3_reverse Q42_45_1_reverse Q42_45_2 Q42_45_3_reverse Q42_45_4

polychoric Q41_1 Q41_2 Q41_3_reverse
display r(sum_w)
global N = r(sum_w)
matrix r = r(R)
factormat r, n($N)
predict auth
label variable auth "Latent variable - Authoritarianism"

polychoric Q42_45_1_reverse Q42_45_2 Q42_45_3_reverse Q42_45_4
display r(sum_w)
global N = r(sum_w)
matrix r = r(R)
factormat r, n($N)
predict socdom
label variable socdom "Latent variable - Social dominance"


* Populist attitudes

polychoric Q46_Q53_1 Q46_Q53_2 Q46_Q53_3 Q46_Q53_4 Q46_Q53_5 Q46_Q53_6 Q46_Q53_7 Q46_Q53_8
display r(sum_w)
global N = r(sum_w)
matrix r = r(R)
factormat r, n($N)
predict populism
label variable populism "Latent variable - Populist attitudes"


* Anti-immigration

gen Q54_Q56_3_reverse = 6 - Q54_Q56_3
gen Q57_reverse = 6 - Q57
gen Q58_reverse = 6 - Q58

polychoric Q54_Q56_1 Q54_Q56_2 Q54_Q56_3_reverse Q57_reverse Q58_reverse
display r(sum_w)
global N = r(sum_w)
matrix r = r(R)
factormat r, n($N)
predict anti_imm
label variable anti_imm "Latent variable - Anti-immigrant attitudes"


* Economic positions 

gen Q59_Q63_2_reverse = 11 - Q59_Q63_2
gen Q59_Q63_5_reverse = 11 - Q59_Q63_5


* Cultural positions

gen Q64_Q67_1_reverse = 11 - Q64_Q67_1
gen Q64_Q67_2_reverse = 11 - Q64_Q67_2
gen Q64_Q67_3_reverse = 11 - Q64_Q67_3
gen Q64_Q67_4_reverse = 11 - Q64_Q67_4

polychoric Q64_Q67_1 Q64_Q67_2 Q64_Q67_3 Q64_Q67_4
display r(sum_w)
global N = r(sum_w)
matrix r = r(R)
factormat r, n($N)
predict cult_pos
label variable cult_pos "Latent variable - Socio-cultural positions"


* Political trust

polychoric Q12_Q16_1 Q12_Q16_2 Q12_Q16_3 Q12_Q16_4 Q12_Q16_5
display r(sum_w)
global N = r(sum_w)
matrix r = r(R)
factormat r, n($N)
predict trust
label variable trust "Latent variable - Political trust"


* Internal efficacy

polychoric Q17_Q19_1 Q17_Q19_2 Q17_Q19_3
display r(sum_w)
global N = r(sum_w)
matrix r = r(R)
factormat r, n($N)
predict int_efficacy
label variable int_efficacy "Latent variable - Internal efficacy"


* External efficacy

polychoric Q20_Q22_1 Q20_Q22_2 Q20_Q22_3
display r(sum_w)
global N = r(sum_w)
matrix r = r(R)
factormat r, n($N)
predict ext_efficacy
label variable ext_efficacy "Latent variable - External efficacy"


* PRR as danger to democracy

replace Q31 = 1 - Q31
label def Q31 0 "Disagree" 1 "Agree"
label values Q31 Q31











